css: Add -gtk-dpi CSS property hack
authorBenjamin Otte <otte@redhat.com>
Thu, 5 Feb 2015 17:52:59 +0000 (18:52 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 5 Feb 2015 17:57:29 +0000 (18:57 +0100)
commit89f635fee1bd0af3bdbf96e2545e0140ea99afc9
treec5a325dc40704037a6f808c2515639eaab743c10
parent7eecb16404b9fdcd1377e1a159f5e94f079e24b7
css: Add -gtk-dpi CSS property hack

This property is necessary to ensure widgets automatically update after
the text scale factor is changed desktop-wide.

And if I'm already doing a property like this, I can make it
overridable. So now you can override the dpi per-widget with CSS like
GtkSwitch {
  -gtk-dpi: 48;
}
if you want to debug things.

Long-term, we want to get rid of this property and insist on dpi being
96 everywhere and people can change the font size to get larger fonts.
gtk/gtkcssinitialvalue.c
gtk/gtkcssstylepropertyimpl.c
gtk/gtkcsstypesprivate.h
gtk/gtkwidget.c